<?php

function Delete_Text($Submenu_ID){
  mysql_query("DELETE FROM top_menu_text WHERE ((Type_ID=$Submenu_ID) AND (Type='MENU'))");
}

function Rename_Submenu($Rename_Submenu_ID,$Submenu_New_Caption,$SC_Show_No){
	$sql="UPDATE top_menu_sub_category SET SC_Caption=\"$Submenu_New_Caption\",SC_Show_No=$SC_Show_No WHERE ID=$Rename_Submenu_ID";
	@$sql_result = mysql_query($sql);
	return $sql_result;
}

function Delete_Submenu($Delete_Submenu_ID){
  	/*
  	//test, ci podkategoria neobsahuje produkty
  	$sql="SELECT COUNT(*) FROM top_menu_text WHERE ((Type='NEWS') AND (Type_ID=$Delete_Submenu_ID))";
	$sql_result_row = mysql_fetch_row(mysql_query($sql));
	if($sql_result_row[0]==0){
	*/
	  	//zistenie ID nadradenej kategorie
	  	$sql="SELECT TC_ID FROM top_menu_sub_category WHERE ID=$Delete_Submenu_ID";
		$sql_result_row = mysql_fetch_row(mysql_query($sql));
		$TC_ID=$sql_result_row[0];
		
		//vymazanie textu
		Delete_Text($Delete_Submenu_ID);
		
	  	//vymazanie
		$sql="DELETE FROM top_menu_sub_category WHERE ID=$Delete_Submenu_ID";
		@$sql_result_delete = mysql_query($sql);
		if(!$sql_result_delete) print "Podmenu nebolo vymazane. Chybu oznamte urychlene tvorcom aplikacie.";
		//zistenie ci existuje v hlavnej kategorii este dalsie podmenu, ak nie, tak sa hlavne
		//menu zmeni na menu bez podmenu - pouzije sa ID top kategorie
		$sql="SELECT COUNT(*) FROM top_menu_sub_category WHERE TC_ID=$TC_ID";
		$sql_result_row = mysql_fetch_row(mysql_query($sql));
		if($sql_result_row[0]==0){
		  	Switch_TC_To_No_Have_SC($TC_ID);
			Add_Submenu($TC_ID,"",0);
		}
}

function Add_Submenu($TC_ID,$SC_Caption,$SC_Show_No){
	$sql_result = mysql_query("INSERT INTO top_menu_sub_category (TC_ID,SC_Caption,SC_Show_No) VALUES($TC_ID,\"$SC_Caption\",$SC_Show_No)");
	$Type_ID = mysql_insert_id();
	return $sql_result;
}

function Switch_TC_To_Have_SC($TC_ID){
	@$sql_result = mysql_query("UPDATE top_menu_top_category SET TC_Have_SC=1 WHERE ID=$TC_ID");
	return $sql_result;
}

function Switch_TC_To_No_Have_SC($TC_ID){
	@$sql_result = mysql_query("UPDATE top_menu_top_category SET TC_Have_SC=0 WHERE ID=$TC_ID");
	return $sql_result;
}

function TC_Have_SC($TC_ID){
	$sql_result = mysql_fetch_row(mysql_query("SELECT TC_Have_SC FROM top_menu_top_category WHERE ID=$TC_ID"));
	return $sql_result[0]; //1 or 0
}

function Insert_Submenu($TC_ID,$Submenu_Caption,$SC_Show_No){
  	//zistenie, ci ma menu podkategorie
	$sql_result_row = mysql_fetch_row(mysql_query("SELECT TC_Have_SC FROM top_menu_top_category WHERE ID=$TC_ID"));
	if($sql_result_row[0]==0){//=menu nema podkategorie
		//premenovanie prazdneho zaznamu
		mysql_query("UPDATE top_menu_sub_category SET SC_Caption=\"$Submenu_Caption\",SC_Show_No=$SC_Show_No WHERE TC_ID=$TC_ID");
		//nastavenie podkategorie na typ vlastniaci submenu
	  	Switch_TC_To_Have_SC($TC_ID);
	}
	else
		//pridanie zaznamu do databazy
		Add_Submenu($TC_ID,$Submenu_Caption,$SC_Show_No);
}

function Insert_Topmenu($Topmenu_Caption,$TC_Show_No){
	@$sql_result = mysql_query("insert into top_menu_top_category (TC_Caption, TC_Have_SC, TC_Show_No) VALUES(\"$Topmenu_Caption\",0,$TC_Show_No)");
	return $sql_result && Add_Submenu(mysql_insert_id(),"",0);
}

function Rename_Topmenu($Rename_Topbmenu_ID,$Topmenu_New_Caption,$TC_Show_No){
	@$sql_result = mysql_query("UPDATE top_menu_top_category SET TC_Caption=\"$Topmenu_New_Caption\", TC_Show_No=$TC_Show_No WHERE ID=$Rename_Topbmenu_ID");
	return $sql_result;
}

function Delete_Topmenu($Delete_Topmenu_ID){
  	//overenie ci neobsahuje podkategorie
do{
		if(TC_Have_SC($Delete_Topmenu_ID)){
			print  "<script language=\"JavaScript\">
	                <!--
	                        window.alert(\"".UTM_DELETE_TOPMENU_ALERT__KATEGORIA_OBSAHUJE_PODKATEGORIE_KTORE_MUSIA_BYT_NAJSKOR_VYMAzANE."\");
	                //-->
	                </script>";
	        break;
	    }
	    //overenie ci neobsahuje produkty
	    $sql_result = mysql_fetch_row(mysql_query("
                SELECT 
                  COUNT(*) FROM top_menu_top_category,top_menu_sub_category,top_menu_text 
		WHERE(
                    (top_menu_top_category.ID=top_menu_sub_category.TC_ID) and 
                    (top_menu_sub_category.ID=top_menu_text.Type_ID) and 
                    ('MENU'=top_menu_text.Type) and
                    (top_menu_top_category.ID=$Delete_Topmenu_ID)
                )")
            );
	    if($sql_result[0]){
	    	print  "<script language=\"JavaScript\">
	                <!--
	                        window.alert(\"".UTM_DELETE_TOPMENU_ALERT__KATEGORIA_OBSAHUJE_PRODUKTY_KTORE_MUSIA_BYT_NAJSKOR_VYMAZANE."\");
	                //-->
	                </script>";
	        break;
	    }
            mysql_query("DELETE FROM top_menu_sub_category WHERE TC_ID=$Delete_Topmenu_ID");
            @$sql_result = mysql_query("DELETE FROM top_menu_top_category WHERE ID=$Delete_Topmenu_ID");
            return $sql_result;
	}while(0);
}


//------------------------------------------------------------------------------
//-------|                           FORMS                              |-------
//------------------------------------------------------------------------------

function New_Submenu_Form($ShowAsNewSubCategory,$ActualTCID,$roll_menu){
	if($ShowAsNewSubCategory==$ActualTCID)
		print "
			<table cellpadding=\"0\" cellspacing=\"0\" style=\"border: 0px;\">
			<tr>
				<td>
					<form action=\"categorie_creator.php\" method=\"post\">
						<table cellpadding=\"0\" cellspacing=\"0\" style=\"border: 0px;\">
						<tr>
							<td>
								<input type=\"hidden\" value=\"NO\" name=\"ShowAsNewSubCategory\" />
								<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />
								<input type=\"hidden\" value=\"".$ActualTCID."\" name=\"TC_ID\" />
								<input type=\"text\" value=\"".UTM_NAZOV."\" name=\"Submenu_Caption\" 
									style=\"width:150px;background-color:white;border:1px solid black;\" />
								<font style=\"font-size:10px;font-family:verdana;\">".UTM_PORADOVE_CISLO."</font>
								<input type=\"text\" value=\"0\" name=\"SC_Show_No\" 
									style=\"width:20px;background-color:white;border:1px solid black;\" />
							</td>
							<td>
						    	<input type=\"submit\" value=\"".UTM_OK."\" style=\"width :50px;border:1px solid black;\"
						        	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\"
						        	onmouseout= \"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />
						    </td>
						</tr>
						</table>
					</form>
				</td>
				<td>
					<form action=\"categorie_creator.php\" method=\"post\">
						<input type=\"hidden\" value=\"NO\" name=\"ShowAsNewSubCategory\" />
						<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />
				    	<input type=\"submit\" value=\"".UTM_ZRUSIT."\" style=\"width :50px;border:1px solid black;\"
				        	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\"
				        	onmouseout= \"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />
					</form>
				</td>
			</tr>
		</table>";	
	else
		print "
			<form action=\"categorie_creator.php\" method=\"post\">
				<input type=\"hidden\" value=\"".$sql_array_SMnu->ID."\" name=\"ID\" />
				<input type=\"hidden\" value=\"$ActualTCID\" name=\"ShowAsNewSubCategory\" />
				<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />
		    	<input type=\"submit\" value=\"".UTM_PRIDAT_PODKATEGORIU."\" style=\"width :150px;border:1px solid black;\"
		        	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\"
		        	onmouseout= \"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />
			</form>";
}

function Rename_Submenu_Form($ShowAsUpdate,$ActualID,$roll_menu){
	if($ShowAsUpdate==$ActualID){
	  	$Caption = mysql_fetch_array(mysql_query("SELECT SC_Caption,SC_Show_No  FROM top_menu_sub_category WHERE ID=$ActualID"));
		print "
			<table cellpadding=\"0\" cellspacing=\"0\" style=\"border: 0px;\">
			<tr>
				<td>
					<form action=\"categorie_creator.php\" method=\"post\">
						<table cellpadding=\"0\" cellspacing=\"0\" style=\"border: 0px;\">
						<tr>
							<td>
								<table cellpadding=\"0\" cellspacing=\"0\" style=\"border: 0px;\">
									<tr>
										<td>
											<font style=\"font-size:10px;font-family:verdana;\">".UTM_NAZOV."</font>
										</td>
										<td>								
											<input type=\"text\" value=\"".$Caption["SC_Caption"]."\" name=\"Submenu_New_Caption\" 
												style=\"width:90px;background-color:white;border:1px solid black;\" />
										</td>
										<td>
											<font style=\"font-size:10px;font-family:verdana;\">".UTM_PORADOVE_CISLO."</font>
										</td>
										<td>
											<input type=\"text\" value=\"".$Caption["SC_Show_No"]."\" name=\"SC_Show_No\" 
												style=\"width:20px;background-color:white;border:1px solid black;\" />
										</td>
									</tr>
								</table>
							</td>
							<td>
								<input type=\"hidden\" value=\"NO\" name=\"ShowAsUpdate\" />
								<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />
								<input type=\"hidden\" value=\"".$ActualID."\" name=\"Rename_Submenu_ID\" />
						    	<input type=\"submit\" value=\"".UTM_OK."\" style=\"width:50px;border:1px solid black;\"
						        	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\"
						        	onmouseout= \"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />
						    </td>
						</tr>
						</table>
					</form>
				<td>
					<form action=\"categorie_creator.php\" method=\"post\">
						<input type=\"hidden\" value=\"NO\" name=\"ShowAsUpdate\" />
						<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />
				    	<input type=\"submit\" value=\"".UTM_ZRUSIT."\" style=\"width :50px;border:1px solid black;\"
				        	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\"
				        	onmouseout= \"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />
					</form>
				</td>
			</tr>
			</table>";	
	}	
	else
		print "
			<form action=\"categorie_creator.php\" method=\"post\">
				<input type=\"hidden\" value=\"".$sql_array_SMnu->ID."\" name=\"ID\" />
				<input type=\"hidden\" value=\"$ActualID\" name=\"ShowAsUpdate\" />
				<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />
		    	<input type=\"submit\" value=\"".UTM_UPRAVIT_PODKATEGORIU."\" style=\"width :400px;border:1px solid black;text-align:center;\"
		        	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\"
		        	onmouseout= \"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />
			</form>";
}

function Delete_Submenu_Form($ShowAsDelete,$ActualID,$roll_menu){
	if($ShowAsDelete==$ActualID)
		print "
			<table cellpadding=\"0\" cellspacing=\"0\" style=\"border: 0px;\">
			<tr>
				<td>
					<form action=\"categorie_creator.php\" method=\"post\">
						<table cellpadding=\"0\" cellspacing=\"0\" style=\"border: 0px;\">
						<tr>
							<td>
								<font style=\"font-size:10px;font-family:verdana;\"><b>".UTM_NAOZAJ_ODSTRANIT."</b></font><br />
							</td>
							<td>
								<input type=\"hidden\" value=\"NO\" name=\"ShowAsDelete\" />
							</td>
							<td>
								<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />
								<input type=\"hidden\" value=\"".$ActualID."\" name=\"Delete_Submenu_ID\" />
						    	<input type=\"submit\" value=\"".UTM_ANO."\" style=\"width :50px;border:1px solid black;\"
						        	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\"
						        	onmouseout= \"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />
						    </td>
						</tr>
						</table>
					</form>
				</td>
				<td>
					<form action=\"categorie_creator.php\" method=\"post\">
						<input type=\"hidden\" value=\"NO\" name=\"ShowAsDelete\" />
						<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />
				    	<input type=\"submit\" value=\"".UTM_NIE."\" style=\"width :50px;border:1px solid black;\"
				        	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\"
				        	onmouseout= \"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />
					</form>
				</td>
			</tr>
		</table>";
	else
		print "
			<form action=\"categorie_creator.php\" method=\"post\">
				<input type=\"hidden\" value=\"".$sql_array_SMnu->ID."\" name=\"ID\" />
				<input type=\"hidden\" value=\"$ActualID\" name=\"ShowAsDelete\" />
				<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />
		    	<input type=\"submit\" value=\"".UTM_ODSTRANIT."\" style=\"width :210px;border:1px solid black;text-align:center;\"
		        	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\"
		        	onmouseout= \"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />
			</form>";
}

function New_Topmenu_Form($ShowAsNewTopCategory,$roll_menu){
	if($ShowAsNewTopCategory=="YES")
		print "
			<table cellpadding=\"0\" cellspacing=\"0\" style=\"border: 0px;\">
			<tr>
				<td>
					<form action=\"categorie_creator.php\" method=\"post\">
						<table cellpadding=\"0\" cellspacing=\"0\" style=\"border: 0px;\">
						<tr>
							<td>
								<input type=\"text\" value=\"".UTM_NAZOV."\" name=\"Top_Menu_Caption\" 
									style=\"width:160px;background-color:white;border:1px solid black;\" />
								<font style=\"font-size:10px;font-family:verdana;\">".UTM_PORADOVE_CISLO."</font>
								<input type=\"text\" value=\"0\" name=\"TC_Show_No\" 
									style=\"width:20px;background-color:white;border:1px solid black;\" />
							</td>
							<td>
								<input type=\"hidden\" value=\"NO\" name=\"ShowAsNewTopCategory\" />
								<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />
						    	<input type=\"submit\" value=\"".UTM_OK."\" style=\"width :50px;border:1px solid black;\"
						        	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\"
						        	onmouseout= \"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />
						    </td>
						</tr>
					</form>
				</td>
				<td>
					<form action=\"categorie_creator.php\" method=\"post\">
						<input type=\"hidden\" value=\"NO\" name=\"ShowAsNewTopCategory\" />
						<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />
				    	<input type=\"submit\" value=\"".UTM_ZRUSIT."\" style=\"width :50px;border:1px solid black;\"
				        	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\"
				        	onmouseout= \"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />
					</form>
				</td>
			<tr>
		</table>";		
	else
		print "
			<form action=\"categorie_creator.php\" method=\"post\">
				<input type=\"hidden\" value=\"".$sql_array_SMnu->ID."\" name=\"ID\" />
				<input type=\"hidden\" value=\"YES\" name=\"ShowAsNewTopCategory\" />
				<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />
		    	<input type=\"submit\" value=\"".UTM_PRIDAT_HLAVNU_KATEGORIU."\" style=\"width :160px;border:1px solid black;\"
		        	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\"
		        	onmouseout= \"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />
			</form>";
}

function Rename_Topmenu_Form($ShowAsTopMenuUpdate,$ActualID,$roll_menu){
	if($ShowAsTopMenuUpdate==$ActualID){
	  	$Caption = mysql_fetch_array(mysql_query("SELECT TC_Caption,TC_Show_No  FROM top_menu_top_category WHERE ID=$ActualID"));
		print "
			<table cellpadding=\"0\" cellspacing=\"0\" style=\"border: 0px;\">
			<tr>
				<td>
					<form action=\"categorie_creator.php\" method=\"post\">
						<table cellpadding=\"0\" cellspacing=\"0\" style=\"border: 0px;\">
							<tr>
								<td>									
									<table cellpadding=\"0\" cellspacing=\"0\" style=\"border: 0px;\">
										<tr>
											<td>
												<font style=\"font-size:10px;font-family:verdana;\">".UTM_NAZOV."</font>
											</td>
											<td>
												<input type=\"text\" value=\"".$Caption["TC_Caption"]."\" name=\"Topmenu_New_Caption\" 
													style=\"width:90px;background-color:white;border:1px solid black;\" />
											</td>
											<td>
												<font style=\"font-size:10px;font-family:verdana;\">".UTM_PORADOVE_CISLO."</font>
											</td>
											<td>
												<input type=\"text\" value=\"".$Caption["TC_Show_No"]."\" name=\"TC_Show_No\" 
													style=\"width:20px;background-color:white;border:1px solid black;\" />
											<td>
										</tr>
									</table>
								</td>
								<td>
									<input type=\"hidden\" value=\"NO\" name=\"ShowAsTopMenuUpdate\" />
									<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />
									<input type=\"hidden\" value=\"".$ActualID."\" name=\"Rename_Topbmenu_ID\" />
							    	<input type=\"submit\" value=\"".UTM_OK."\" style=\"width :50px;border:1px solid black;\"
							        	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\"
							        	onmouseout= \"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />
							    </td>
							</tr>
						</table>
					</form>
				</td>
				<td>
					<form action=\"categorie_creator.php\" method=\"post\">
						<input type=\"hidden\" value=\"NO\" name=\"ShowAsTopMenuUpdate\" />
						<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />
				    	<input type=\"submit\" value=\"".UTM_ZRUSIT."\" style=\"width :50px;border:1px solid black;\"
				        	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\"
				        	onmouseout= \"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />
					</form>
				</td>
			</tr>
			</table>";
	}
	else
		print "
			<form action=\"categorie_creator.php\" method=\"post\">
				<input type=\"hidden\" value=\"".$sql_array_TMnu->ID."\" name=\"ID\" />
				<input type=\"hidden\" value=\"$ActualID\" name=\"ShowAsTopMenuUpdate\" />
				<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />
		    	<input type=\"submit\" value=\"".UTM_UPRAVIT_HLAVNU_KATEGORIU."\" style=\"width :400px;border:1px solid black;text-align:center;\"
		        	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\"
		        	onmouseout= \"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />
			</form>";
}

function Delete_Topmenu_Form($ShowAsTopMenuDelete,$ActualID,$roll_menu){
	if($ShowAsTopMenuDelete==$ActualID)
		print "
			<table cellpadding=\"0\" cellspacing=\"0\" style=\"border: 0px;\">
			<tr>
				<td>
					<form action=\"categorie_creator.php\" method=\"post\">
						<table cellpadding=\"0\" cellspacing=\"0\" style=\"border: 0px;\">
							<tr>
								<td>
									<font style=\"font-size:10px;font-family:verdana;\"><b>".UTM_NAOZAJ_ODSTRANIT."</b></font><br />
								</td>
								<td>
									<input type=\"hidden\" value=\"NO\" name=\"ShowAsTopMenuDelete\" />
								</td>
								<td>
									<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />
									<input type=\"hidden\" value=\"".$ActualID."\" name=\"Delete_Topmenu_ID\" />
							    	<input type=\"submit\" value=\"".UTM_ANO."\" style=\"width :50px;border:1px solid black;\"
							        	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\"
							        	onmouseout= \"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />
							    </td>
							</tr>
						</table>
					</form>
				</td>
				<td>
					<form action=\"categorie_creator.php\" method=\"post\">
						<input type=\"hidden\" value=\"NO\" name=\"ShowAsTopMenuDelete\" />
						<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />
				    	<input type=\"submit\" value=\"".UTM_NIE."\" style=\"width :50px;border:1px solid black;\"
				        	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\"
				        	onmouseout= \"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />
					</form>
				</td>
			</tr>
		</table>";		
	else
		print "
			<form action=\"categorie_creator.php\" method=\"post\">
				<input type=\"hidden\" value=\"".$sql_array_TMnu->ID."\" name=\"ID\" />
				<input type=\"hidden\" value=\"$ActualID\" name=\"ShowAsTopMenuDelete\" />
				<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />
		    	<input type=\"submit\" value=\"".UTM_ODSTRANIT."\" style=\"width :210px;border:1px solid black;text-align:center;\"
		        	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\"
		        	onmouseout= \"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />
			</form>";
}
?>